package com.hkd.product_service.api;

/**
 * @author HKD
 * @date 2022/9/17 21:18
 */

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hkd.common.api.ApiResponse;
import com.hkd.product_service.api.dto.BrandListQueryDTO;
import com.hkd.product_service.api.dto.InsertBrandDTO;
import com.hkd.product_service.api.fallback.BrandInfoServiceImplFallback;
import com.hkd.product_service.api.vo.BrandListVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "product-service",
        contextId = "BrandInfoService",
        fallbackFactory = BrandInfoServiceImplFallback.class
)
public interface BrandInfoService {
    @PostMapping("insertBrandDTO")
    ApiResponse insertBrandDTO(@RequestParam("curUserId") String curUserId, @RequestBody InsertBrandDTO param);

    @PostMapping("listBrand")
    ApiResponse<Page<BrandListVO>> listBrand(@RequestBody BrandListQueryDTO param);
}
